package com.globefrog.framework.log;
import ch.qos.logback.classic.PatternLayout;
import java.util.Map;

/**
 * 过滤信息日志格式.
 *
 * @author caijinbang
 * @date 2020-11-08 15:17
 */
public class FilterMessagePatternLayout extends PatternLayout {

  public FilterMessagePatternLayout() {
    Map<String, String> converters = this.getInstanceConverterMap();
    // 重新指定m,msg,message的转换,可根据自定义的
    converters.put("m", FilterMessageConverter.class.getName());
    converters.put("msg", FilterMessageConverter.class.getName());
    converters.put("message", FilterMessageConverter.class.getName());
  }
}
